import { get, post , put } from '@/utils/request'
const VERSION = '/v1'
const SING = '/sign'
const USER_PREFIX = '/user'

export default {
  loadCaptcha: params => get(VERSION, '/sign/captcha', params),
  login: params => post(VERSION, '/sign/in', params),
  logout: params => get(VERSION, '/sign/out', params),
  permission: params => get(VERSION, '/user/permissions', params),
  userinfo: params => get(VERSION, '/user', params),
  updateUserinfo: params => put(VERSION, '/user/quick_update', params),
  updateUserPwd: params => put(VERSION, '/user/password', params),
  //-----------------消息接口
  loadSysMessage: params => get(VERSION, '/sys/user/noticemessage/page', params),//系统消息
  readSysMessage: params => put(VERSION, '/sys/user/noticemessage/read', params),//系统消息已读
  loadUserMessage: params => get(VERSION, '/sys/user/message/page', params),//用户消息
  readUserMessage: params => put(VERSION, '/sys/user/message/read', params),//用户消息已读
  messageCount: params => get(VERSION, '/sys/user/message/count', params),//消息未读统计
}
